//
//  ArmItemInfoCreateView.m
//  wAudioShare
//
//  Created by Anson on 14-11-18.
//  Copyright (c) 2014年 赵帅. All rights reserved.
//

#import "ArmItemInfoCreateView.h"

@interface ArmItemInfoCreateView ()




@end

@implementation ArmItemInfoCreateView

-(void)initView
{
    self.layer.masksToBounds = YES;
    self.layer.borderWidth = 1;
    self.layer.cornerRadius = 8;
    self.layer.borderColor = [[UIColor lightGrayColor] CGColor];
    [self setContentMode:UIViewContentModeScaleAspectFill];
    [self setClipsToBounds:YES];
    
}

- (IBAction)dismiss:(id)sender {
    [self moveToDownSide];
}

-(void)pageStart
{
//    [[NSNotificationCenter defaultCenter] addObserver:self
//                                             selector:@selector(keyboardWillShow:)
//                                                 name:UIKeyboardWillShowNotification
//                                               object:nil];
//    
//    [[NSNotificationCenter defaultCenter] addObserver:self
//                                             selector:@selector(keyboardWillHide:)
//                                                 name:UIKeyboardWillHideNotification
//                                               object:nil];
    
    handleView = [[UIApplication sharedApplication] keyWindow].rootViewController.view;
    keyView = self;
    [handleView addSubview:keyView];
    
    blackView = [[UIControl alloc]initWithFrame:handleView.bounds];
    blackView.backgroundColor = [UIColor colorWithRed:0 green:0 blue:0 alpha:0.5f];
    [blackView addTarget:self action:@selector(moveToDownSide) forControlEvents:UIControlEventTouchUpInside];
    [handleView insertSubview:blackView belowSubview:self];
    
    keyView.frame = CGRectMake((320-keyView.frame.size.width)/2,
                               handleView.frame.size.height,
                               keyView.frame.size.width,
                               keyView.frame.size.height);
    
    [self moveToUpSide];
}

@end
